package com.tally.server.dto;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

public class LikesDTO {

    /**
     * 点赞的用户id
     */
    private Integer userId;

    /**
     * 点赞的文章id
     */
    private String postId;

    /**
     * 点赞状态
     */
    private Integer likeStatus;

    /**
     * 用户信息
     */
    private UserDTO user;

    /**
     * 创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }

    public Integer getLikeStatus() {
        return likeStatus;
    }

    public void setLikeStatus(Integer likeStatus) {
        this.likeStatus = likeStatus;
    }

    public UserDTO getUser() {
        return user;
    }

    public void setUser(UserDTO user) {
        this.user = user;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("LikesDTO{");
        sb.append("userId=").append(userId);
        sb.append(", postId='").append(postId).append('\'');
        sb.append(", likeStatus=").append(likeStatus);
        sb.append(", userDTO=").append(user);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append('}');
        return sb.toString();
    }
}